package com.xiaoyu.lanling.feature.moment.model.detail

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.views.list.ListItemTypedBase
import com.xiaoyu.base.model.User
import com.xiaoyu.lanling.feature.moment.model.Comment
import com.xiaoyu.lanling.media.image.UserImageLoadParam

class CommentItem(jsonData: JsonData) : ListItemTypedBase {

    val user = User.fromJson(jsonData.optJson("user"))
    val avatarLoadParam = UserImageLoadParam.newBuilder().setUserAndDP(user,40).build()
    val comment = Comment.fromJson(jsonData.optJson("comment"))

    override fun getViewType(): Int {
        return 0
    }
}